package com.xfyr.mvpdemo.contract;

import com.orjl.networkj.BaseResponseObjectModel;
import com.xfyr.mvpdemo.base.BaseView;


import java.util.List;

import bean.NewsBean;
import io.reactivex.Observable;

/**
 * 版权： 版权所有
 * <p>
 * 作者：suntinghui
 * <p>
 * 创建日期：2019/6/25 0025 16:13
 * <p>
 * 描述：
 * <p>
 * 修订历史：
 */
public interface MainContract {
    interface Model {
        Observable<BaseResponseObjectModel<List<NewsBean>>> getNewsM(String key, String num);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(String errorCode, String errorMsg);

        void onSuccess(List<NewsBean> newsBeans);

        String newsCount();

        void onItemSelect(NewsBean newsBean);

        void onListRefresh();
    }

    interface Presenter {
        void getNewsP(String key);

        void onRefresh();

        void onItemClick(NewsBean newsBean);

    }
}
